class TextModel {
  int code;
  String content;
  String dataId;
  String msg;
  List<Results> results;
  String taskId;

  TextModel(
      {this.code,
      this.content,
      this.dataId,
      this.msg,
      this.results,
      this.taskId});

  TextModel.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    content = json['content'];
    dataId = json['dataId'];
    msg = json['msg'];
    if (json['results'] != null) {
      results = new List<Results>();
      json['results'].forEach((v) {
        results.add(new Results.fromJson(v));
      });
    }
    taskId = json['taskId'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['content'] = this.content;
    data['dataId'] = this.dataId;
    data['msg'] = this.msg;
    if (this.results != null) {
      data['results'] = this.results.map((v) => v.toJson()).toList();
    }
    data['taskId'] = this.taskId;
    return data;
  }
}

class Results {
  List<Details> details;
  String label;
  num rate;
  String scene;
  String suggestion;

  Results({this.details, this.label, this.rate, this.scene, this.suggestion});

  Results.fromJson(Map<String, dynamic> json) {
    if (json['details'] != null) {
      details = new List<Details>();
      json['details'].forEach((v) {
        details.add(new Details.fromJson(v));
      });
    }
    label = json['label'];
    rate = json['rate'];
    scene = json['scene'];
    suggestion = json['suggestion'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.details != null) {
      data['details'] = this.details.map((v) => v.toJson()).toList();
    }
    data['label'] = this.label;
    data['rate'] = this.rate;
    data['scene'] = this.scene;
    data['suggestion'] = this.suggestion;
    return data;
  }
}

class Details {
  String label;

  Details({this.label});

  Details.fromJson(Map<String, dynamic> json) {
    label = json['label'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['label'] = this.label;
    return data;
  }
}
